import React, { Component } from 'react';
import './commentmain.css'
import Comment from './输入框/comment';
import CommentList from './xinxi/xinxi';

class CommentMain extends Component{
    state = { 
        list: []
      } 
      updateList = (msg) => {
        const list = [...this.state.list]
        list.push(msg)
         this.setState({
            list
         })
      }

      render() { 
          return (<div className='commentmax' >
            <Comment updateList={this.updateList} />
            <CommentList list={this.state.list} />
          </div>);
      }
}
export default CommentMain